<template>
  <p>Child - {{ name }} - {{ age }}</p>
</template>

<script>
export default {
  name: "Child",
  // 接受祖先组件传递provide数据
  inject: ["name", "age"],
};
</script>

<style>
</style>